{include file="base/header" /}
{include file="base/menu" /}

<script type="text/javascript" src="PUBLIC_PATH/assets/js/Popt.js"></script>
<script type="text/javascript" src="PUBLIC_PATH/assets/js/city.json.js"></script>
<script type="text/javascript" src="PUBLIC_PATH/assets/js/citySet.js"></script>
<style type="text/css">
* { -ms-word-wrap: break-word; word-wrap: break-word; }
html { -webkit-text-size-adjust: none; text-size-adjust: none; }
html, body {height:100%;width:100%; }
.wrap{width:564px;height:34px;margin:200px auto;border:0;position:relative;}
.input{position:absolute;top:0;left:0;width:457px;margin:0;padding-left:5px;height:30px;line-height:30px;font-size:12px;border:1px solid #c9cacb;}
s{position:absolute;top:1px;right:0;width:32px;height:32px;background:url("PUBLIC_PATH/assets/i/arrow.png") no-repeat;}
._citys { width: 550px; display: inline-block; border: 2px solid #eee; padding: 5px; position: relative; }
._citys span { color: #05920a; height: 15px; width: 15px; line-height: 15px; text-align: center; border-radius: 3px; position: absolute; right: 10px; top: 10px; border: 1px solid #05920a; cursor: pointer; }
._citys0 { width: 95%; height: 34px; line-height: 34px; display: inline-block; border-bottom: 2px solid #05920a; padding: 0px 5px; font-size:14px; font-weight:bold; margin-left:6px; }
._citys0 li { display: inline-block; line-height: 34px; font-size: 15px; color: #888; width: 80px; text-align: center; cursor: pointer; }
._citys1 { width: 100%; display: inline-block; padding: 10px 0; }
._citys1 a { width: 83px; height: 35px; display: inline-block; background-color: #f5f5f5; color: #666; margin-left: 6px; margin-top: 3px; line-height: 35px; text-align: center; cursor: pointer; font-size: 12px; border-radius: 5px; overflow: hidden; }
._citys1 a:hover { color: #fff; background-color: #05920a; }
.AreaS { background-color: #05920a !important; color: #fff !important; }
</style>


<link rel="stylesheet" href="http://unpkg.com/element-ui@2.4.8/lib/theme-chalk/index.css" />
<script src="http://unpkg.com/vue/dist/vue.js"></script>
<script src="http://unpkg.com/element-ui@2.4.8/lib/index.js"></script>


</head>
<body>


<link rel="stylesheet" href="PUBLIC_PATH/assets/css/selector.css">





<div class="admin">

 <!--

		<div class="daohang">
			<ul>
				<li><button type="button" class="am-btn am-btn-default am-radius am-btn-xs"> 首页 </li>
				<li><button type="button" class="am-btn am-btn-default am-radius am-btn-xs">帮助中心<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close="">×</a></button></li>
				<li><button type="button" class="am-btn am-btn-default am-radius am-btn-xs">奖金管理<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close="">×</a></button></li>
				<li><button type="button" class="am-btn am-btn-default am-radius am-btn-xs">产品管理<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close="">×</a></button></li>


			</ul>


-- -->
</div>




<div class="admin-biaogelist">

   <input type="hidden" name="cityId" id="cityId" value="0"/>
   <input type="hidden" name="industryId" id="industryId" value="0"/>
   <input type="hidden" name="imageData" id="imageData"/>
   <input type="hidden" name="activityType" id="activityType" value="0"/>


    <div class="listbiaoti am-cf">
      <ul class="am-icon-flag on"> 活动发布</ul>

      <dl class="am-icon-home" style="float: right;"> 当前位置： 首页 > <a href="#">商品列表</a></dl>



    </div>

    <div class="fbneirong">
      <form class="am-form">
        <div class="am-form-group am-cf">
          <div class="zuo">标题：</div>
          <div class="you">
            <input type="text" class="am-input-sm" id="Title" placeholder="请输入标题">
          </div>
        </div>


        <div class="am-form-group am-cf">
          <div class="zuo">活动类型：</div>
          <div class="am-btn-group doc-js-btn-1" data-am-button>
          {volist name="activityType" id="vo"}
          <label class="am-btn am-btn-primary">
           <input type="radio" name="options" value="{$vo.id}" id="{$vo.id}">{$vo.activityName}
           </label>
          {/volist}
     </div>

         有效期:
          <select  data-am-selected id="days">
            <option value="30">30天</option>
            <option value="45">45天</option>
            <option value="45">60天</option>
            <option value="7">7天</option>
            </select>


          <label class="am-checkbox-inline">
            <input type="checkbox" value="1" id="isAddMail">
            添加邮箱</label>




        </div>


             <div class="am-form-group am-cf">
          <div class="zuo">工作地点：</div>
          <div class="you">

        <div class="am-input-group">
      <span class="am-input-group-label"></span>
       <input class="input" name="" id="city" type="text" placeholder="请选择" autocomplete="off" readonly="true"/><s></s>
         </div>

     </div>
        </div>



        <div class="am-form-group am-cf">
          <div class="zuo">内容：</div>
          <div class="you">
            <textarea class="" rows="10" id="content"></textarea>
          </div>
        </div>

       <div class="am-form-group am-cf">
          <div class="zuo">公司规模：</div>
          <div class="you">

             <select  data-am-selected id="scaleMode">
             {volist name="scaleMode" id="scale"}
            <option value="{$scale.id}">{$scale.value}</option>
             {/volist}
            </select>

            学历要求:
          <select  data-am-selected id="educationalType">
          {volist name="educationalType" id="educationalType"}
            <option value="{$educationalType.id}">{$educationalType.name}</option>
           {/volist}
            </select>
            工作类型:
             <select data-am-selected id="jobsType">
             {volist name="jobsType" id="jobs"}
            <option value="{$jobs.id}">{$jobs.name}</option>
             {/volist}
            </select>

          </div>
        </div>


     <div class="am-form-group am-cf">
          <div class="zuo">行业：</div>
          <div class="you">

<div id="app">
<el-cascader :options="optionsWithDisabled" @change="handleChange"></el-cascader>
</div>
 </div>
  </div>

        <div class="am-form-group am-cf">
          <div class="zuo">图片：</div>
          <div class="you" style="height: 45px;">
            <input type="file" id="doc-ipt-file-1">
            <p class="am-form-help">请选择要上传的文件...</p>
          </div>
        </div>




        <div class="am-form-group am-cf">
          <div class="you" style="margin-left: 11%;">
              <button onclick="submitToIndex()" type="button" class="am-btn am-btn-success am-radius">发布并查看</button>&nbsp;  &raquo; &nbsp; <button onclick="submitNext()" type="button" class="am-btn am-btn-secondary am-radius">发布并继续发布</button>

          </div>
        </div>
      </form>
    </div>



<div id="sublist" style="display:none"></div>

<script>

var Main = {
    data() {
      return {
        optionsWithDisabled: [{
          value: '11000',
          label: 'IT互联网',
          disabled: false,
          children: [{
            value: '11100',
            label: '软件',
            children: [{
              value: '11101',
              label: '数据库'
            }, {
              value: '11102',
              label: 'C#/.NET'
            }, {
              value: '11103',
              label: 'Hadoop'
            }, {
              value: '11104',
              label: 'Android'
            }, {
              value: '11105',
              label: '算法'
            }, {
              value: '11106',
              label: 'iOS'
            }, {
              value: '11107',
              label: 'IT运维'
            }, {
              value: '11108',
              label: 'Python'
            }, {
              value: '11109',
              label: '云计算/大数据'
            }, {
              value: '11110',
              label: 'Node.js'
            }, {
              value: '11111',
              label: '数据挖掘'
            }, {
              value: '11112',
              label: 'PHP'
            }, {
              value: '11113',
              label: 'Ruby/Perl'
            }, {
              value: '11114',
              label: '测试'
            }, {
              value: '11115',
              label: 'Java'
            }, {
              value: '11116',
              label: 'C/C++'
            }, {
              value: '11117',
              label: '前端'
            }
            ]
          }, {
            value: '11200',
            label: '运营',
            children: [{
              value: '11201',
              label: '新媒体'
            }, {
              value: '11202',
              label: '内容运营'
            }, {
              value: '11203',
              label: '编辑'
            }, {
              value: '11204',
              label: 'SEO'
            }, {
              value: '11205',
              label: '产品运营'
            }]
          }, {
            value: '11300',
            label: '硬件',
            children: [{
              value: '11301',
              label: '嵌入式'
            }, {
              value: '11302',
              label: '集成电路'
            }]
          }, {
            value: '11400',
            label: '设计',
            children: [{
              value: '11401',
              label: 'Flash'
            }, {
              value: '11402',
              label: 'UI/UE'
            }, {
              value: '11403',
              label: '特效'
            }, {
              value: '11404',
              label: '网页/美工'
            }, {
              value: '11405',
              label: '2D/3D'
            }]
          }, {
            value: '11500',
            label: '通信',
            children: [{
              value: '11501',
              label: '物联网'
            }, {
              value: '11502',
              label: '射频'
            }, {
              value: '11503',
              label: '通信'
            }]
          }, {
            value: '11600',
            label: '产品',
            children: [{
              value: '11601',
              label: '用户研究'
            }, {
              value: '11602',
              label: '产品助理'
            }]
          }
          ]
        }, {
          value: '12000',
          label: '市场商务',
          children: [
          {
            value: '12100',
            label: '商务',
            children: [{
              value: '12101',
              label: '商务'
            }, {
              value: '12102',
              label: '招投标'
            }]
          },{
            value: '12200',
            label: '销售',
            children: [{
              value: '12201',
              label: '推广'
            }, {
              value: '12202',
              label: '销售'
            }]
          },{
            value: '12300',
            label: '公关',
            children: [{
              value: '12301',
              label: '媒介'
            }, {
              value: '12302',
              label: '公关'
            }]
          },{
            value: '12400',
            label: '客服',
            children: [{
              value: '12401',
              label: '客户服务'
            }, {
              value: '12402',
              label: '销售支持'
            }]
          },{
            value: '12500',
            label: '市场',
            children: [{
              value: '12501',
              label: '渠道'
            }, {
              value: '12502',
              label: '分析/调研'
            }, {
              value: '12503',
              label: '策划'
            }, {
              value: '12504',
              label: '品牌'
            }, {
              value: '12505',
              label: '市场'
            }]
          }, ]
        }, {
          value: '13000',
          label: '电子',
          children: [
          {
            value: '13100',
            label: '电子',
            children: [{
              value: '13101',
              label: '光电',
            }, {
              value: '13102',
              label: '半导体/芯片',
            }, {
              value: '13103',
              label: '电子工程',
            }]
          },{
            value: '13200',
            label: '电气',
            children: [{
              value: '13201',
              label: '电气设计',
            }, {
              value: '13202',
              label: '电气工程',
            }]
          } ]
        }, {
          value: '14000',
          label: '人事行政',
          children: [
          {
            value: '14100',
            label: '人力资源',
            children: [{
              value: '14101',
              label: '人事/HR',
            }, {
              value: '14102',
              label: '招聘',
            }, {
              value: '14103',
              label: '企业文化',
            }]
          },{
            value: '14200',
            label: '猎头',
            children: [{
              value: '14201',
              label: '猎头',
            }]
          },{
            value: '14300',
            label: '行政',
            children: [{
              value: '14201',
              label: '行政',
            },{
              value: '14202',
              label: '前台',
            },{
              value: '14203',
              label: '助理',
            } ]
          } ]
        }, {
          value: '15000',
          label: '外语外贸',
          children: [
          {
            value: '15100',
            label: '外语',
            children: [{
              value: '15101',
              label: '英语',
            }, {
              value: '15102',
              label: '日语',
            }, {
              value: '15103',
              label: '翻译',
            }]
          },{
            value: '15200',
            label: '外贸',
            children: [{
              value: '15201',
              label: '报关员',
            },{
              value: '15202',
              label: '外贸专员',
            } ]
          } ]
        } ,
        {
          value: '16000',
          label: '财经法务',
          children: [
          {
            value: '16100',
            label: '金融',
            children: [{
              value: '16101',
              label: '基金',
            }, {
              value: '16102',
              label: '证券',
            }, {
              value: '16103',
              label: '风控',
            }, {
              value: '16104',
              label: '金融',
            }]
          },{
            value: '16200',
            label: '投资',
            children: [{
              value: '16201',
              label: '分析师',
            },{
              value: '16202',
              label: '投资',
            } ]
          } ,{
            value: '16300',
            label: '法务',
            children: [{
              value: '16301',
              label: '合规',
            },{
              value: '16302',
              label: '律师',
            },{
              value: '16303',
              label: '法务',
            } ]
          },{
            value: '16400',
            label: '银行',
            children: [{
              value: '16401',
              label: '客户经理',
            },{
              value: '16402',
              label: '部门经理',
            },{
              value: '16403',
              label: '货款',
            },{
              value: '16404',
              label: '大堂经理',
            }
            ]
          },{
            value: '16500',
            label: '保险',
            children: [{
              value: '16501',
              label: '客户经理',
            },{
              value: '16502',
              label: '部门经理',
            }
            ]
          },{
            value: '16600',
            label: '财会',
            children: [{
              value: '16601',
              label: '审计',
            },{
              value: '16602',
              label: '税务',
            },{
              value: '16603',
              label: '财务',
            },{
              value: '16604',
              label: '会计/出纳',
            }
            ]
          }
          ]
        }, {
          value: '17000',
          label: '教育咨询',
          children: [
          {
            value: '17100',
            label: '咨询',
            children: [{
              value: '17101',
              label: '咨询/顾问',
            }]
          },{
            value: '17200',
            label: '教育',
            children: [{
              value: '17201',
              label: '教务',
            },{
              value: '17202',
              label: '教师',
            },{
              value: '17203',
              label: '幼教',
            },{
              value: '17204',
              label: '培训',
            },{
              value: '17205',
              label: '课程',
            } ]
          } ]
        }  , {
          value: '18000',
          label: '媒体设计',
          children: [
          {
            value: '18100',
            label: '广告',
            children: [{
              value: '18101',
              label: '创意',
            },{
              value: '18102',
              label: '策划',
            },{
              value: '18103',
              label: 'AE',
            }
            ]
          },{
            value: '18200',
            label: '编辑',
            children: [{
              value: '18201',
              label: '编辑/采编',
            },{
              value: '18202',
              label: '校对/排版',
            }]
          },{
            value: '18300',
            label: '设计',
            children: [{
              value: '18301',
              label: '美术设计',
            },{
              value: '18302',
              label: '平面设计',
            },{
              value: '18303',
              label: '工业设计',
            },{
              value: '18304',
              label: '视觉设计',
            }
            ]
          } ,{
            value: '18400',
            label: '媒体',
            children: [{
              value: '18401',
              label: '记者',
            },{
              value: '18402',
              label: '编导',
            },{
              value: '18403',
              label: '主持/播音',
            }
            ]
          } ,{
            value: '18500',
            label: '艺术',
            children: [{
              value: '18501',
              label: '演艺',
            },{
              value: '18502',
              label: '摄影',
            }
            ]
          }  ]
        } , {
          value: '19000',
          label: '其他行业',
          children: [
          {
            value: '19100',
            label: '体育快消',
            children: [{
              value: '19101',
              label: '快消',
            },{
              value: '19102',
              label: '体育',
            }
            ]
          },{
            value: '19200',
            label: '机械制造',
            children: [{
              value: '19201',
              label: '质量',
            },{
              value: '19202',
              label: '机械设计',
            },{
              value: '19203',
              label: '生产',
            },{
              value: '19204',
              label: '安全',
            },{
              value: '19205',
              label: '设备',
            },{
              value: '19206',
              label: '自动化',
            }]
          },{
            value: '19300',
            label: '物流采购',
            children: [{
              value: '19301',
              label: '采购',
            },{
              value: '19302',
              label: '供应链',
            },{
              value: '19303',
              label: '物流',
            }]
          } ,{
            value: '19400',
            label: '建筑房产',
            children: [{
              value: '19401',
              label: '城规/市政',
            },{
              value: '19402',
              label: '工程造价',
            },{
              value: '19403',
              label: '建筑',
            },{
              value: '19404',
              label: '土木',
            },{
              value: '19405',
              label: '园林',
            },{
              value: '19406',
              label: '地产开发/策划',
            },{
              value: '19407',
              label: '房产销售',
            },{
              value: '19408',
              label: '给排水',
            },{
              value: '19409',
              label: '物业管理',
            }
            ]
          } ,{
            value: '19500',
            label: '生物医疗',
            children: [{
              value: '19501',
              label: '医生',
            },{
              value: '19502',
              label: '医药',
            },{
              value: '19503',
              label: '生物',
            },{
              value: '19504',
              label: '护理',
            }
            ]
          } ,{
            value: '19600',
            label: '能源环保',
            children: [{
              value: '19601',
              label: '矿产',
            },{
              value: '19602',
              label: '能源',
            },{
              value: '19603',
              label: '环保',
            }
            ]
          } ,{
            value: '19700',
            label: '食品材料',
            children: [{
              value: '19701',
              label: '材料',
            },{
              value: '19702',
              label: '食品',
            }
            ]
          } ,{
            value: '19800',
            label: 'NGO公益',
            children: [{
              value: '19801',
              label: '志愿者',
            }]
          } ]
        }]
      };
    },
   methods: {
      handleChange(value) {
    //console.log(value[value.length-1]);
      $("#industryId").val(value[value.length-1]);
      }
    }
  };
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')

</script>


<script type="text/javascript">

  // 获取选中的值
  $(function() {
    var $radios = $('[name="options"]');
    $radios.on('change',function() {
      console.log('单选框当前选中的是：', $radios.filter(':checked').val());
      $("#activityType").val($radios.filter(':checked').val());

    });
  });
</script>
<script type="text/javascript">
$("#city").click(function (e) {
	SelCity(this,e);
});
$("s").click(function (e) {
	SelCity(document.getElementById("city"),e);
});
</script>

<script type="text/javascript">
function submitToIndex()
{
submit(1);
}
function submitNext()
{
submit(2);
}
function submit(openType)
{
var Title = document.getElementById("Title").value;
var cityId =  document.getElementById("cityId").value;
var industryId = document.getElementById("industryId").value;
var imageData = document.getElementById("imageData").value;
document.getElementById('content').value=document.getElementById('content').value.replace(/\r\n/g,"/h1a2n3g4").replace(/\r/g,"/h1a2n3g4").replace(/\n/g,"/h1a2n3g4").replace(/\s/g,"/k1o2n3g4");
var content = document.getElementById("content").value;
var activityType = document.getElementById("activityType").value;
var scaleMode = $('#scaleMode option:selected').val();
var educationalType = $('#educationalType option:selected').val();
var days = document.getElementById("days").value;
var jobsType = $('#jobsType option:selected').val();
if(Title==''){alert('标题不能为空');return;}
if(content==''){alert('内容不能为空');return;}
if(activityType==0){alert('请选择活动类型');return;}
var url ="{:url('activity/submit')}";
$.AMUI.progress.start();
 $.post(url,{Title:Title,cityId:cityId,industryId:industryId,imageData:imageData,content:content,activityType:activityType,scaleMode:scaleMode,educationalType:educationalType,jobsType:jobsType,days:days},function(result){
    if(result.status==1)
    {
    $.AMUI.progress.done();
    var activityId = result.activityId;
     if(openType==1)
     {
     window.location.href="http://www.youhuer.com/index.php?s=/Mob/Enterprise/activityDetails/activityId/"+activityId;
     }else
     {
  parent.location.reload();
     }

   }
  });


}
</script>

 {include file="base/footer" /}